
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@ page import="com.spoto.oa.model.*"%>
<%@ page import="java.util.*"%>
<%@ page import="com.spoto.oa.util.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>公告类型管理</title>

		<link href="style/v1/common/welcome.css" rel="stylesheet" />
		<script type="text/javascript" src="js/lib/jquery-1.4.2.js">
</script>
		<script src="js/common/list.js" type="text/javascript">
</script>
<style type="text/css">
.img{background:url(style/v1/images/notice.png) no-repeat; width:24px; height:24px;}

</style>
	</head>

	<body>
		<div id="welcome">
			<div class="label">
				<div class="img">
				</div>
				<h2>
					公告类型管理
				</h2>
			</div>

			<%
				Object ob = request.getAttribute("noticeTypes");
				if (null != ob) {
					List<NoticeType> types = (List<NoticeType>) ob;
					if (types.isEmpty()) {
			%>
			<div id="no-exits">
				不存在公告类型
			</div>
			<%
				} else {
			%>
			<div id="list">
				<form action="NoticeTypeServlet" method="post">
					<div id="table-ope-left">
						<input type="hidden" name="op_type" value="multi_del" />
						<button type="button" class="select_btn" name="select_all">
							全选
						</button>
						<button type="button" class="select_btn" name="select_reverse">
							反选
						</button>
						<button type="button" class="select_btn" name="select_cancel">
							取消
						</button>
						<input type="submit" id="mul-del" value="删除选中" />
						<a href="notice/add_noticeType.jsp">添加公告类型</a>
					</div>
					<div id="c"></div>


					<table class="table">
						<tr class="firstrow">
							<td>
								公告类型
							</td>

							<td>
								类型编号
							</td>
							<td>
								操作
							</td>
						</tr>
						<tr>
							<%
								for (NoticeType e : types) {
							%>
							<td style="text-align: left">

								<input type="checkbox" name="del-flag" value="<%=e.getId()%>" />
								<a href="NoticeTypeServlet?id=<%=e.getId()%>&op_type=to_update"
									class="update_a"> <%
 	out.print(e.getName());
 %> </a>
							</td>
							<td>
								<%=e.getNo()%>
							</td>

							<td>
								<a href="NoticeTypeServlet?id=<%=e.getId()%>&op_type=delete"
									onclick="return isDelete()">删除</a>
								<a href="NoticeTypeServlet?id=<%=e.getId()%>&op_type=to_update"
									class="update_a">修改</a>
							</td>
						</tr>
						<%
							}
								}
							}
						%>
					</table>
				</form>
			</div>



		</div>
	</body>
</html>
